|
How do we print a master detail form in VBNet without using Crystal report?
Any example in VBNet 2002:rolleyes :?
|
|
|
|
|
|
Hi all
I've following problem, i have an array of computer name (in LAN and not in LAN), all i want is get the domain name of specific computer (if the computer is in domain). For example, i've found a computer named "COMP1" which have controlled by a domain controller and i want to display the domain name of COMP1 (COMP1 is not in my LAN and is a internet computer which i've found by scanning IP).
I mentioned to use a function like that
Function GetDomain(ByVal sCompName As String) As String
'Do something here and get the domain name of sCompName and return to user
End Function
Is it a possible way to do that by programming with VB6?
Anyhelp might be very helpful
Thank alots!
.::LDLP::.
|
|
|
|
|
I'm using DataGridTableStyle to change the datagrid properties, but if it's using stored procedure, then it won't work, is there anybody knows why?
here is my code, when I run it, the datagrid headerText and width didn't change..
Dim DGTableStyle As New DataGridTableStyle
Dim textCol As New DataGridTextBoxColumn
grdAddPlan.TableStyles.Clear()
DGTableStyle.MappingName = "dbo.p_JobPlan"
textCol.MappingName = "EntityID"
textCol.HeaderText = " "
textCol.Width = 2
DGTableStyle.GridColumnStyles.Add(textCol)
textCol = New DataGridTextBoxColumn
textCol.MappingName = "ID"
textCol.HeaderText = "Plan ID"
textCol.Width = 30
DGTableStyle.GridColumnStyles.Add(textCol)
grdAddPlan.TableStyles.Add(DGTableStyle)
Lisa
|
|
|
|
|
I have written this code at page load and creating a dataset :
Dim cnn As MySqlConnection
cnn = New MySqlConnection ("SERVER=newserver;username=root;password=;DATABASE=new")
cnn.open()
Dim sql As String
sql = "select BillId, VenderID from tblbillMaster"
Dim dA As New MySqlDataAdapter(sql, cnn)
Dim DS As New DataSet
dA.Fill(DS, "tblBillMaster")
And I have added a Blank crystal Report in my project.
And I have added to parameter fields names: BillId , name
if my tblbillMaster have 5 rows then how these all rows
will display in Crystal REport in these two fields.
SoftWare Engineer
|
|
|
|
|
I am working on file based Messenger application (using VB.NET) in which i m using a Web Service where all my application functions are written. I have a list of users which i m desplaying in a treeview & refreshing this list every 5 seconds. I call a function from web service to get the latest list of online users. But i want to run this process in background using threads. But i m not able to do this.
Code is:
----------------------------------------------------------------------------
Private populate_userlist_thread As Threading.Thread
Private Sub RefreshUserList()
'This is my main function, here i m calling another function using thread.
populate_userlist_thread = New Threading.Thread(AddressOf PopulateUsers)
populate_userlist_thread.Start()
End Sub
'Here is the delegate
Delegate Sub GeneralDelegate()
Private invoker As GeneralDelegate
Private Sub PopulateUsers()
Dim msngr_serv_obj As MessengerService.MessengerFunctions
Dim users_dataset As DataSet
Dim i As Int32
Dim curr_node As TreeNode
Dim tree_node_collection As TreeNodeCollection
msngr_serv_obj = New MessengerService.MessengerFunctions
users_dataset = msngr_serv_obj.GetOnlineUsers
UsersTreeView.Nodes.Clear()
For i = 0 To users_dataset.Tables(0).Rows.Count - 1
If UsersTreeView.InvokeRequired = True Then
invoker = New GeneralDelegate(AddressOf RefreshUserList)
UsersTreeView.Invoke(invoker)
End If
curr_node = UsersTreeView.Nodes.Add(users_dataset.Tables(0).Rows(i).Item(0).ToString)
curr_node.ForeColor = Color.Green
Next
End Sub
----------------------------------------------------------------------------
But this code is not working fine. Can anybody plz help me. Or do u have any other solution to this problem.
Thanks
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
you are invoking 'RefreshUserList' from within the 'PopulateUsers' method ?
that can't be good...
AND you should invoke ALL the GUI related methods by delegates as you did in
usersTreeView.invoke(Invoker) otherwise strange things happen.
Fade (Amit BS)
|
|
|
|
|
Thanks for reply amit.
Actually the whole problem is i m calling Refresh userlist function every 5 seconds. should i destroy the previous thread before calling the function or not.
Sumit Domyan
Software Developer
ANALEC INFOTECH
|
|
|
|
|
invoker = New GeneralDelegate(AddressOf RefreshUserList)<br />
UsersTreeView.Invoke(invoker)
that's a code from the PopulateUsers() sub... unless i'm missing something this kind of action will create threads until something bad will happen , am i missing something ?
i'll assume that either i am, or you have modified the code to invoke the RefreshUserList sub every 5.
now i think that it might be best not the destroy the previously created thread, but to monitor it's existence, possible by using a global or shared boolean member probably named 'blRefreshingUserList', each time you enter your timer event, before you create a new thread check and see whether the previous one has finished.
Although i don't see a scenario in which you won't finish refreshing in 5 secs. in 5 secs you can add A LOT or info, i think that something else is wrong,
if you wold like to send me the code and tell me what you want it to do, i'll check it and see why it is not working.
if not, you may also present more info so i can help you better, your choice (i won't steal your code anyway though)
Fade (Amit BS)
|
|
|
|
|
I am trying to build a simple application that grabs an HTML file and creates an image out of it. There is an article in codeproject that does this in C#, however, I cannot make it work and also I want to it in VB.net, and I am not very familiar with C#.
http://www.codeproject.com/internet/htmlimagecapture.asp[^]
Does anyone know if there is a VB.net version of this project, or can someone help me with figuring out how to do it in VB.net? (I have already built an app that uses mshtml to load the html, I just cant figure how to use GDI to translate into an image.)
thanks
dd
|
|
|
|
|
For example, if i have the same item name in database, then when i select the item name from the list, it will only display one item name.
|
|
|
|
|
Would anyone happen to know how to develope a windows application that counts down from 100 to 10 by 10's, and from 10 to 1 by 1's and then prints BLAST OFF! in Visual Basic.Net
Need Help!!!!!!!
|
|
|
|
|
Place a timer and a label on a form. Set the timer interval to 10,000 and enabled to true. Then add the following event handler:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static counter As Integer = 20
If counter > 10 Then
counter -= 10
If counter = 10 Then Timer1.Interval = 1000
Label1.Text = counter.ToString
ElseIf counter > 1 Then
counter -= 1
Label1.Text = counter.ToString
Else
Label1.Text = "Blast Off!"
Timer1.Enabled = False
End If
End Sub
Hope this helps
Tom
|
|
|
|
|
Thanks Tom you are a life saver. I know nothing about VB.NET but would love to know alot more in programming. I am trying to teach myself from a book I bought from a tech store on learning VB.NET. If I have anymore question would you be able to assist me if possible if you are not too busy? Once again thanks
Need Help!!!!!!!
|
|
|
|
|
Just post here, i am sure someone will help if they can. Another good source is groups.google.com, quite often the question has been asked before.
Cheers
Tom
|
|
|
|
|
I can't see the images on the toolbar buttons.
|
|
|
|
|
I need to be able to disable / enable items in a combobox. Any ideas on how to do this?
Thanks,
Tim
|
|
|
|
|
The combobox doesn't support this, it's all or nothing. You'll have to use a 3rd party component (don't know of any off the top of my head) or write and woner draw a new combobox class yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
In theory this is just a visual thing; if you handle the drawing of the items in the combobox (DrawMode= OwnerDrawFixed and handle the DrawItem event of the combobox) you could display certain items as 'disabled' then handle the SelectedItemChanged event differently for those items and maybe reselect the previous item.
Hope this helps
Tom
|
|
|
|
|
Hi all,
I can't find how to break long string constants to the multiple lines.
Example:
Dim mystring as string
string.insert(0, "VeryVeryVery...
.LongLine")
The VB don't understand, that the string constant continues on the nextline.
Please help,
Thanks in advance
|
|
|
|
|
You break long strings this way.
dim mystring as string = "A very, very, very " & _
"Long line."
|
|
|
|
|
You shouldn't type a very long line in VB. It's really inconvenient.
You may write it to a file such as *.txt, then load it to your string var. It's convenient that: you can easily repair the text.
GF bos
|
|
|
|
|
Hi,
Can VB.Net convert sprite sheets to animations and if it can is their any examples or any source code available.
|
|
|
|
|
I open update forms for specific entities by Form.ShowDialog(). In some Windows XPs it works fine. In some and in WinME and Win98 it opens and immediately closes. For some Form.ShowDialog() it works fine It seems like a resporce problem. When I open the problematic forms in design view I get the following error:
Failed To Parse code: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name index.
What can the problem be? It is a very serious problem for me and I am at the edge of losing my customers! I think the only reliable way to develop .net application is notepad development!
|
|
|
|
|
I'd say you are either trying to run some code in the form load event that crashes depending on the OS (seen this happen if referencing directory listings when the 'hide known file extensions' of winexplorer is enabled) or your form is corrupted.
If the form is corrupted you should recreate from scractch. If you want to copy/past the code you should paste to notepad first and from there to vs.
Hope this helps.. can't say much more without looking at the code.
|
|
|
|