Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
Q

QzRz

@QzRz
About
Posts
114
Topics
57
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MSDN Subscription and VS 11
    Q QzRz

    Hi, I am not able to convince my boss to give me an MSDN Subscription, so i'm thinking of buying one myself at home. If i buy VS10 Professional with MSDN do I get to upgrade to vs11 for free, or do I have to buy an upgrade? Do all updates of existing MS Products come free of charge?, so I can get windows 8, next version of Office, Expression Studio and Windows server 2012/MS SQL server 2012? Will I be able to install these products both at my home computer and at my work computer? Best regards, QzRz

    Visual Studio 2015 & .NET 4.6 database sql-server visual-studio sysadmin windows-admin

  • TextBox trigger question
    Q QzRz

    Hello I have a textBox which I want to add some "ghost" text on, which is visible whenever the textbox does not have focus. I could do it with codebehind, but since I am new to WPF and XAML I would like to do it all from XAML code, to get some practice. Currently my XAML code looks like this:

    <TextBox x:Name="textBoxUsername" Margin="5,5">
    <TextBox.Style>
    <Style TargetType="TextBox">
    <Style.Triggers>
    <Trigger Property="IsFocused" Value="false">
    <Setter Property="Text" Value="Username"/>
    <Setter Property="Foreground" Value="LightGray"/>
    <Setter Property="FontStyle" Value="Italic"/>
    </Trigger>
    </Style.Triggers>
    </Style>
    </TextBox.Style>
    </TextBox>

    What I would like to do, is add another statement to the trigger so it checks if the text is set by the user. This is where I need help, I cannot figure out what to write, so it checks if the text is set by the user or not. If this is not the right way to solve this, I would be happy to get an Article/blog/something which describes how to do it :) //QzRz

    WPF wpf csharp database help tutorial

  • Event in a Thread
    Q QzRz

    Hello I have created my own event and delegate, they look like this:

    public delegate Answer delegateCallResponse(Request req);
    public event delegateCallResponse eventCallResponse;
    

    the Request and Answer is 2 struct which contain a few strings/ints. I got a method to handle the event, which look like

    public Answer ans = new Answer();
    private Answer OnEvent(Request req) {
    FillRequest(req);
    while (!ans.filled) { Thread.Sleep(1000); }
    return this.ans; }
    

    the ans.filled is a bool indication whether the information is filled or not. My problem is that the Answer can take a while to get filled and the code as it is now, will make the mainthread sleep thus making the GUI unavailable for some time. Is there a way to run the event in a thread? or just another way to make it wait than use the while function? //QzRz

    C# help question

  • XmlSerialize and nullable types
    Q QzRz

    Hello I am new to XmlSerializing and I got a problem when trying to serialize a nullable int. The thing I serialize look like this private int? length; public int? Length { get { return this.length; } set { this.length = value; } } But when I serialize this, and it is null, the output looks like this: <Length d3p1:nil="true" xmlns:d3p1="http://www.w3.org/2001/XMLSchema-instance" /> What I want it to do is, when the int is null, I want it to be ignored and thereby not having any output to my xml-file. I could make my int to a string and then convert the string to an int whenever I need, but that doesnt seem to be a good solution to me. So, does any of you know a way to XmlSerialize an int and then if it is null, it shouldt be showed in the xml-file, or a good article/something? //QzRz

    C# xml help question

  • Load an image with directx
    Q QzRz

    Hello I have an application wich runs with directx. My problem is i'm new to directx and the thing which I want to create is pretty simple. I want to load an image and then show it on the interface, then I want to get the events when the user clicks/mouse over/whatever on the picturebox. I have tried a few tutorials on the internet but havent seen to find a thing which solves my problem. I hope there is an easy way to do this, like an picturebox which can load the image easy. if anyone knows a good article/tutorial/example on how to do this I would be happy. //QzRZ

    C# tutorial graphics game-dev help

  • Change the global cursor
    Q QzRz

    I got it to work now, thanks :D

    C# csharp html com help tutorial

  • Change the global cursor
    Q QzRz

    It works for me too, thanks :) I just have 2 questions now. Where did you find the number for ORC_NORMAL? and how to chance the cursor back to normal again? I will assume what you need to do is add another const int with another value which?

    C# csharp html com help tutorial

  • Change the global cursor
    Q QzRz

    Hello I have currently made a small colorpicker application. I want to know if it is possible to change the global cursor when I press a button in my application, the reason is I want to see the crooshair cursor outside my application too. I have searched the internet and the best thing I could find was to use the "user32.dll" with the function SetSystemCursor, however I have no clue if this is the right thing to do. the SetSystemCursor needs an 'IntPtr hcur, uint id' but I do not know how to get the correct values for them. I searched the msdn from my vs05 and it said the id could must be some constants which needs to be defined before loading the windows.h header. To help people help me, the link for pinvoke.net is here: pinvoke.net and the link for the info I used on msdn: msdn I hope someone can help me regards QzRz

    C# csharp html com help tutorial

  • Alternative to listbox/listview
    Q QzRz

    Thanks for the good answer I couldt get the Suspend thing to work, but the AddRange() works perfect :)

    C# question learning

  • Alternative to listbox/listview
    Q QzRz

    Hello I got a list of words I need to show the user of my application. The list is around 1000 words. I have tried to fill the words in both a listbox and a listview(with view set to detail and 1 columns) I have a button which refres the data in the list, simply by removing them all and then re-fill them, if the list isnt too long it doesnt bother the user, but if the list is 1000 lines (as in my situation) it takes too long time to enter all the data again. I thought there might be some alternative to listbox/listview which is made to handle alot of lines? Otherwise it is probably my code which is wrong, however i'm still in the beginnign phase :) To make an easy test I use this funktion (same for-loop to add data to the listview)

    private void Test()
    {
    this.listBox1.Items.Clear();
    for (int i = 0; i < 1000; i++)
    this.listBox1.Items.Add(i);
    }

    if anyone got something else I can look up in a book or on the internet to find another way to handle this I would be really happy.

    C# question learning

  • Mono in vs2005
    Q QzRz

    Hello I want to know if it is possible to create projects in visual studio 2005 which uses the mono with Gtk as interface. I got no computer which runs linux, therefore it would be great if it was possible to create it in visual studio 2005. I have tried monodevelop and Sharpdevelop, but I still like visual studio more. If anyone got a good article or tutorial on this subject I would appreciate it. regards QzRz

    Visual Studio csharp visual-studio linux tutorial

  • is it possible to change the Naming convention?
    Q QzRz

    Pete O`Hanlon wrote:

    Nope - that's not what I was saying. I was saying rather than accepting what he says as gospel, you think for yourself and question it. Just because I, or somebody else, says that something is so doesn't actually mean it is. Apply a healthy dose of scepticism and make sure that what is being said is actually true.

    It was my choice of word which was bad, ofcause I will have to do as you write it. But starting up as new in the coding stuff it is hard to see which names is the best, therefore you kind of trust everything the teacher say. So if he says he think the Hungarian is the best, you will think it is too. But he didnt force us to use it, he just told us it was what he think was the best, and what he used himself. So if you look at the blackboard and on every other student using the Hungarian naming its a little hard not to use the same. But I know, as long as I use the same naming notation all over my files it should be good too, however I think it would be best if I could use the naming notation which most people already use. I just made a quick search over the internet and I found a few pages which says the same as you wrote in the first reply, the hungarian is out-dated. So I will keep searching untill I found something which will be in my taste :) I will thank you for helping me, I am really glad that people will use time to help new people :) Just 1 last question, do you have any good forums/sites which discuss all these "new things"?

    Visual Studio question csharp visual-studio algorithms

  • is it possible to change the Naming convention?
    Q QzRz

    Oh, I guess its not a good thing to trust your teachers then :( But if Hungarian isn't good, what can you suggest I should use instead? I would like to use what is best from the beginning so I dont have to change it when I get a job after i'm done in school. //QzRz

    Visual Studio question csharp visual-studio algorithms

  • is it possible to change the Naming convention?
    Q QzRz

    I will ofcause need to rename them to something else as you write. But if visual studio would write "tbx1" so I only would have to remane it to "tbxCancel" it would be really good. My guess is that in a few months it wont be neccesary for me as I can remember all the names of the objects you will use most. But in the beginning I think it could be really helpfull so I dont have to look it up on a paper / book / webpage each time I add a new item which I cant remember the name of, or I will get a bad habit of spelling some of the objects wrong. But thanks for the quick answer, I hope someone else can conform that it cannot be changed, as yours only were a guess. //QzRz

    Visual Studio question csharp visual-studio algorithms

  • is it possible to change the Naming convention?
    Q QzRz

    Hello I have just started as an IT student and ive got the visual studio from the school. There is alot of different ways to name your attributes and objects, however there is a few conventions. After searching the internet I found a few of them very good. If I create a new textbox in visual studio it will call it textBox1 due to one convention 'installed' in the program. Is there a way to change that 'texBox' to another, Fx our teachers tells us that the Hunarian style is really good. So is there a way to change 'textBox' to 'tbx' as the Hungarian style will be. Hopefully it will be done so when I add a new textbox it will be called tbx1 and a button will be called btn1. I hope my question i clear enough regards Qzrz

    Visual Studio question csharp visual-studio algorithms

  • Playing a sound using Media.Soundplayer()
    Q QzRz

    Hello I'm creating an application which use the Media.Soundplayer function. Currently i'm using a Media.Soundplayer funtions that Play when i press on different buttons, it works perfectly. I tried to create a new Media.SoundPlayer and load a file which should be looping while the application is running, but when i use the Media.Soundplayer it stop the previous file and start play the new one. So can anyone tell me how to play a file without it stop play unless i tell it to stop? This is how i load the files: private System.Media.SoundPlayer TrykPaaKnap = new SoundPlayer(Geografika.Properties.Resources.tryk); private System.Media.SoundPlayer BGMusik = new SoundPlayer(Geografika.Properties.Resources.Fjederdansen); Thanks

    C# tutorial question

  • Moving app window with FormBorderStyle set to None
    Q QzRz

    Hello I am creating an application with no FormBorder, and I want the user to be able to move the application as if there was FormBorders. It is something similar to Microsoft Live Messenger (In MLM you can move the window by holding down the left mouse button) So I want to move the application when the user holds down the left mouse button on a picturebox. Is there any way to do that with C#? If so can you tell me an article which describe it, or maybe tell me how to do it? Thanks QzRz

    C# csharp tutorial question

  • Rename Directory/Folder
    Q QzRz

    Hi Thanks for the reply Didnt think of you way to do it, thanks :)

    C# question

  • Rename Directory/Folder
    Q QzRz

    Hello I am trying to rename a Direcotry/folder in windows My way to do it goes like this: private void RenameFolder(DirectoryInfo dir, string NewName) { FileInfo fl = new FileInfo(dir.FullName); fl.MoveTo(string.Concat(dir.Parent + "\\" + NewName)); } My question is if this is the best way to rename a directory/folder? Thanks QzRz

    C# question

  • System.Diagnostics.Process.Start Question
    Q QzRz

    If I try to open a file in windows which is not a know filetype (like the test.WhoCars, windows do not know this filetype) but in windows a dialog comes and you can select a program you want to open the file with. if that helps?

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups