|
Whatever is programmed in C# can be done in VB, regardless of the XAML used (XAML would not have to be converted in this instance). Since I am assuming you were looking at both codes at the same time, I would assume you missed an important chunk.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thank you for the answer.
However, I am new to the WPF technology and would need a hint on what to do with the code I wrote. It is based on the XAML code, because I intend to obtain the same result by procedural code, instead of the designer one. That is, I could deliver you the VB code or even the entire project so that we may figure out the problem. If this is necessary, please inform me (email: cristi2go@yahoo.com).
With regards,
cristi2go.
|
|
|
|
|
Well, since it sounds like you ditched the XAML aspect altogether and converted it to procedural code, then I am not quite sure what to tell you. Even I am having problems converting XAML to procedural code. I am somewhat interested in the code that you are working, but I am completely busy all summer and would have no time to look it over, sorry. The best advice that I can give you is to continue to study MSDN documentation/CodeProject/google results/ and possibly buy a good programming book on XAML. Many of the Apress WPF/XAML books I would not be able to code without.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hi,
My application requires a long process of going through selected rows in the DataGridView and calculating things, this must be done on the main GUI thread. The user needs to be able to cancel this process but otherwise not have any interaction with the main GUI. I need a popup Progress Window (progressBar, label,cancelButton...) that will tell the user how much of the process is done and give them a chance to cancel.
I think I need to create a new thread that will launch a progress window, the progress window will launch a process located on the main thread, and the main thread will comunicate back to the progress window how things are going. I've lookedd for many tutorials but they've all focused on running work on background threads using public variables.
Also, I am still very new to programming and this is m first real application. I ask you explain things in as much detail as possible.
Thank you!
|
|
|
|
|
maksim310 wrote: this must be done on the main GUI thread
Why do you think so?
maksim310 wrote: I think I need to create a new thread that will launch a progress window
No, that's not possible. Only the GUI thread can open windows.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So what's the best way to do this then? I'm going to be coloring 5000 data grid view rows different colors, I need to show the user the progress.
|
|
|
|
|
maksim310 wrote: I'm going to be coloring 5000 data grid view rows different colors
Why color so many rows when the user is only going to see a few at a time?? You got some ginormous monitor you're not telling us about?
|
|
|
|
|
Only 15 or so rows will be seen at once, but the Data Grid View will be displaying all 5000 rows and the user will be scrolling looking for certain patterns.
This is a scientific program where users will be generating copious amounts of color-coded rows and will need to detect patterns as they scroll. THe only other way I can think of is to paint them as they scrool by, but that might be too slow as well as constantly hang up the GUI.
-Max
|
|
|
|
|
Do the work in a background thread and store the results in a synchronised queue. Run a timer in the GUI thread that get the result from the queue and puts them in the grid.
Search the forum for SynchronisedQueue, and you'll find an implementation that I did a while back.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How do you bulid a tablebuilder using excel VB
|
|
|
|
|
Thank you for your help.... This is done
|
|
|
|
|
Hi all,
I have a requirement where I need to get the IPs of all Subdomains in a Domain using VB.Net2005.
for example ,
I have the IP of the Domain "codepro.xyz.net"..
under this server there are many subserver(or subdomains) exists like "codepro.xyz.net\code$"
Here my requirement is to get all such subserver names or their ip addresses .
Any cade samples for this
Thanks in advance..
modified on Monday, June 30, 2008 6:31 AM
|
|
|
|
|
Hello
i read ur question and i want to know some more details of ur question. R u want IP address for local Domain or for particular site....
i m sending u code which is used to find Work group/Domain in ur LAN. and check that which is pc is Active in that LAN and will also show the IP Address...
'---------------------------------------------------
'Method for Finding Domain/WorkGruop
Public Function GetDomain() As String
Dim WGroup As String = ""
Dim query As New SelectQuery("Win32_ComputerSystem")
Dim searcher As New ManagementObjectSearcher(query)
For Each mo As ManagementObject In searcher.Get()
WGroup = mo("Domain")
'MsgBox(WGroup)
Next
Return WGroup
End Function
'---------------------------------------------------
'---------------------------------------------------
'Method for Finding IP Address of and node no which are Active in LAN
Public Sub ListComputers(ByVal TView As TreeView, ByVal WorkGroup As String)
Try
TView.Nodes.Clear()
Dim AllComp As New TreeNode
AllComp.Text = Form1.groupname
AllComp.ImageIndex = 1
AllComp.SelectedImageIndex = 1
TView.Nodes.Add(AllComp)
If WorkGroup.Trim() = "" Then
MessageBox.Show("Please provide a Domain Name.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End If
Dim DomainEntry As New DirectoryEntry("WinNT://" & WorkGroup.Trim())
DomainEntry.Children.SchemaFilter.Add("computer")
For Each Machine As DirectoryEntry In DomainEntry.Children
Dim CompNode As New TreeNode(), CompInfo(1) As String
CompInfo(0) = Machine.Name
Dim Tempaddr As System.Net.IPHostEntry = Nothing
Try
Tempaddr = DirectCast(Dns.GetHostByName(Machine.Name), System.Net.IPHostEntry)
Dim TempAd As System.Net.IPAddress() = Tempaddr.AddressList, str As String = ""
For Each TempA As IPAddress In TempAd
CompInfo(1) = TempA.ToString()
Form1.ListBox1.Items.Add(TempA)
Next
Catch ex As Exception
CompInfo(1) = ""
End Try
CompNode.Text = CompInfo(0)
CompNode.ToolTipText = CompInfo(1)
CompNode.ImageIndex = 0
CompNode.SelectedImageIndex = 0
AllComp.Nodes.Add(CompNode)
Next
TView.ExpandAll()
Catch ex As Exception
End Try
End Sub
'---------------------------------------------------
|
|
|
|
|
Hi Dharmchand,
Thanks for your help ,
but my requirement is to get Ip addresses of a particular domain .
whose IPAddress is known.
|
|
|
|
|
hi...
i hve a mdi form and i added 4 buttons in the mdi form. these buttons are shortcuts of child forms. when i open the child forms , these buttons are showing front, ie, the child form is behind these buttons... can any one help to sortout this..
Tnks in advance..
|
|
|
|
|
Try BringToFront() or SendToBack()
|
|
|
|
|
i already tried that..
wen i used Mdi.sendtoback() --> the window is going hide/ minimised.
wen i used Chil.bringtofront() --> there z no effect.
|
|
|
|
|
This is a double post and you apparently did not take my suggestion from the first time
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Hello,
I have got a question regarding the textbox-control.
Is it possible to resize the input area of a textbox (in a inherited class) by keeping the controls width and height unchanged?
I want place a button right next to the input area. If the user presses the button (or the F4-Key on his keyboard) the textbox should open a Lookup-Form (this is not the problem). This can easily be done by adding a button-control to the ControlCollection, adding a handler to the button's Click-Event and overriding the PreProcessMessage-Function for checking the F4-Key. But I couldn't find out, how to change the size of the input-area, so that the button and the textbox doesn't overlap eachother.
I tried to write an User-control. This works nice, but the User-Control hides all of the Textbox-Properties which I need. So I had to write some kind of wrapper to make them visible again - and this is not really nice.
I would be pleased if someone could give me a hint.
PS: I'm sorry for my bad english-skills.
|
|
|
|
|
Your best bet is to do what you're doing. The textbox is a nasty control, very difficult to derive from b/c it paints itself outside of it's paint event.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Hi Christian,
thanks for your reply. I've wondered why overriding the OnPaint-method does not do anything. Even setting the eventargs to nothing doesnt prevent the control from painting.
I've got two fuether Questons:
- Could you (or someone else) give me a link to the "internals" of the Textbox-Control (MSDN just explain how to make use of the properties, painting is not explained there).
- The Textbox-Control has a nice sizing feature: If Multiline is disabled, the control's height can't be set by Drag'n Drop in Design-Mode. I would like to have such a feature in my UserControl too. How can this be done?
TribleX
|
|
|
|
|
hi,
i'm using VS2008 working on windows application vb.net...
i want to sending data on my listbox through comm RS232, here my code,
dim a as byte
a = convert.tobyte(listbox1.items(3))
the data in that listbox is "85" for example.. then after sending it to comm, the application that receive it show "38 35" where it is in hex.. i'm confusing now why it didn't show "55" where is the correct answer in hex..
plz help me i'm try to do almost two weeks..
|
|
|
|
|
You can't convert a string to a byte. You can convert a char to a byte, but a string is a byte/char array
85 is two characters - 8 and 5. 8 is 38 in hex, and 5 is 35. This is made all the more clear by 35 being 3 less than 38. If you want to convert a number to hex, use a ToString overload, you're looking in the wrong place and confusing yourself.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
If you have a decimal number string to convert to a byte, you should use the Byte.Parse method. You can also convert hexadecimal numbers if you use one of the overloads that takes a Globalization something or other flag.
|
|
|
|