|
Hello Experts!!
I am displaying crystal report by coding,passing parameters in that.
i am displaying report from grid contents when i click on gridview cell then respective record report must display....in this i have problem is when i click first time on grid cell then it display wright record but for second click it shows same previous record........
|
|
|
|
|
you need to add the following line
this is how I do it in C#
cryRpt.Refresh(); //to load the most recent updated report from dataset
|
|
|
|
|
hello...
i m working on vbscrpt code to get the names of Domain ID's which are not logged from 3 months..
Can anybody guide me??
or give me some hints..
because i m seriously blank
i have generated a vbscrpt to check the domain names but cant get through
Domain ID's
pls help!!
purvas
|
|
|
|
|
How about this[^] article? Does it helps?
|
|
|
|
|
THANK YOU VERY MUCH
purvas
|
|
|
|
|
Hello,
I need to detect if is there any audio comming out on the speakers.
I searched all the web and all I couldn't find what I need (or perhaps I didn't know how to look or what to look for )
Anyway, I need to check if there is any audio playing(media player, web..) anything that comes out from the sound card.
If anyone can help me, it will realy save me.
(I am looking for a solution for 3 days now )
Thank you in advance,
Anomis
|
|
|
|
|
anomis wrote: I need to detect if is there any audio comming out on the speakers.
Well, if you can hear anything, there probably is. If you can't, then there probably isn't. Although one can never be sure. You might have a partially eaten banana in your ear, in which case you almost certainly won't be able to hear anything.
On the other hand, if you put a shell suit to your ear, you should at least be able to hear Romford.
Hope this helps.
[Edit]
Sorry, sorry. Please ignore this post.
[/Edit]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Saturday, July 11, 2009 5:19 PM
|
|
|
|
|
I hope you felt good after you wrote this reply
That's how others reply to you, when you are asking for help ?
|
|
|
|
|
How do i change the row heigth of a listviewitem(/treeviewnode) without changing the font heigth?
Thank you!!
|
|
|
|
|
I believe, although I am not able to access VS at the moment, so cannot be sure, there is a OnMeasureItem event that you can override to return a size that you prefer. If you look it up on MSDN I think there is a pretty good example.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I'm currently into similar issues regarding a listbox control. I guess this article[^] might help you further.
Regards
Michael
|
|
|
|
|
Thank you for your help, Michael Schäuble and Henry Minute
I will test it as fast as i can...
Edit: I tested it and it didn't work the listview has no om measureitem-Event only the listbox...
modified on Wednesday, July 15, 2009 2:33 AM
|
|
|
|
|
Hi!
I'm working on a project that involves translating C++ to VB.NET (me not really being a C++ person) and am really stuck on how to translate the following C++ to VB:
sum ^= (((UInteger)(name[i]))<<(off&0x1F));
Where "sum" in an unsigned integer, name is something that I'm not familiar with, but is declared like this:
char *name
And "off" is also an unsigned integer. Do any C++ people out there have any ideas?
Thanks!
MrWolfy
modified on Saturday, July 11, 2009 12:56 PM
|
|
|
|
|
Here's some notes that I hope might help (it's a long time since I did C++ but I think I remember it.)
char *name - declares a pointer to a char, this is a common way to access a string/array of chars. VB.Net equivalent would be a string. So name[i] is the ith char in the string.
(I'm assuming that name is a parameter or that somewhere it has been set to a valid string)
off & 0x1F - is a bitwise and of the variable off and the hex value 0x1F (31 in decimal). Effectively this gives off mod 31 (i.e. remainder after division by 31)
<< - does a left shift by whatever that mod gives. Effectively this multiplies the value in name[i] by 2 to the power of off mod 31 .
sum ^= - means that the value in sum is Xor'd with the the result of the modding and shifting.
Now how you translate that into VB is another matter.
One thing to be wary of is that the C++ is probably dealing with 8-bit chars in VB they are probably 16 bit. You need to know where the data that fills the name string is coming from and so how many bits per char.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Hi!
Thanks! I was going wrong with the "off & 0X1F" part, I had them all joined together and it gave me an error. It didn't occur to me to separate them out.
All the other information was very useful too, and has helped me in my project.
Thanks Again!
MrWolfy 
|
|
|
|
|
Just a caveat to riced's excellent answer:
Do make sure off is not 0FF (zero F F) written in lower case.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Dim name As String
sum = sum Xor ((CUInt(name.Chars(i)))<<(off And &H1F))
David Anton
http://www.tangiblesoftwaresolutions.com
Convert VB to C#, C++, or Java
Convert C# to VB, C++, or Java
Convert C++ to C#, VB, or Java
Convert Java to C#, C++, or VB
|
|
|
|
|
Hi All,
I have generate one issue for Sending mail in Guest Account.
Access to the path 'Global\.net clr networking' is denied.
I search many posts. But nothing found. But i thing Caspol.exe is the solution for this error .
So please help me for using CASPOL.exe
thanks
If you can think then I Can.
|
|
|
|
|
This has nothing to do with programming, if the error is that you need to configure the permissions on your machine. Nor is it something that you can do in your code, to benefit an end user. I get the impression that you're more than a little lost. How are you sending emails ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I read many articles but those are provides only one solution.
Set Fulltrust Permission for ur application byusing CASPOL.exe. Which provids .net framework.
So please tell me how to set permission for my application by using CASPOL.exe.
If you can think then I Can.
|
|
|
|
|
I want to click a link in the web page
<div id="pagination" class="pagination">
<a href="http://google.com/" class="section_links" rel="me next">Next »</a>
</div>
help my
modified on Saturday, July 11, 2009 10:23 AM
|
|
|
|
|
I'm writing a program and need to design it like s sidebar, with the ability of sidebars like Google side bar and windows vista sidebar with a little different that I don't want to use gadgets. is there anyone can help? its serious.
|
|
|
|
|
Ali hojjati wrote: its serious.
But obviously not serious enough for you to google sidebar visual basic, so just how serious can it be?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I writing a program that is used for data entry for my company. On the main form there is a combo box that is full of different components we may test; things such as doors, window, closets, etc. This is list of components is store in a file in the program's directory and loaded when the program loads and all the different components are put into the combo box. This works fine. Now, when an inspector is in the field they may need to add a component not pre-programmed in. So they can go to another form and add the different components. Once they are finished enter any components they may need to add they click a command button "Done" that then saves the new components to a file:
<pre>
'Check if there are structures in the 'lstStructures' list box
If lstStructures.Items.Count > 0 Then
'Create a new file stream
Dim fs As FileStream = New FileStream(AppPath & "\" & StructureFile, FileMode.Truncate, FileAccess.Write, FileShare.None)
'Create a new stream writer
Dim Writer As StreamWriter = New StreamWriter(fs)
'Loop through each component in the 'ComponentArray' array list
For i As Integer = 0 To ComponentArray.Count - 1
'Save current component in the 'CurrentComponent' structure
CurrentComponent = ComponentArray.Item(i)
'Write the component/member string to the stream writer
'(Structure=Member1,Member2,...,MemberN)
Writer.WriteLine(CurrentComponent.ComponentStructure & "=" & CurrentComponent.ComponentMember)
Next
'Flush the stream writer
Writer.Flush()
'Close the stream writer
Writer.Close()
'Close the file stream
fs.Close()
'Close this form
Me.Hide()
End If
FL_ADDED_NEW_STRUCTURE = True
'Load the structures on the main form
frmMain.ReLoadCustoms()
</pre>
Now the <code>frmMain.ReLoadCustoms</code> should reload the file with the newly added components and add them to the combo box:
<pre>
Public Sub ReLoadCustoms()
Dim fs As FileStream
Dim Reader As StreamReader
Dim div() As String
fs = New FileStream(AppPath & "\" & StructureFile, FileMode.Open, FileAccess.Read, FileShare.None)
'Clear Component Array
ComponentArray.Clear()
'Check if the file is empty
If Not fs.Length = 0 Then
'Create a new stream reader
Reader = New StreamReader(fs)
'Read each line of the file until the end of the file
Do Until Reader.EndOfStream
'Split each line delimited with '='
'(Structure=Member1,Member2,...,MemberN)
div = Reader.ReadLine.Split("=")
CurrentComponent.ComponentStructure = div(0)
CurrentComponent.ComponentMember = div(1)
'Save the component in the 'ComponentArray' array list
ComponentArray.Add(CurrentComponent)
Loop
'Close the stream reader
Reader.Close()
'Close the file stream
fs.Close()
End If
cboStructures.Items.Clear()
For i As Integer = 0 To ComponentArray.Count - 1
CurrentComponent = ComponentArray.Item(i)
cboStructures.Items.Add(CurrentComponent.ComponentStructure)
Next
cboStructures.Items.Add("...Add...")
cboStructures.SelectedIndex = 0
cboMembers.Items.Clear()
CurrentComponent = ComponentArray.Item(0)
div = CurrentComponent.ComponentMember.Split(",")
For i As Integer = 0 To div.GetUpperBound(0)
cboMembers.Items.Add(div(i))
Next
cboMembers.SelectedIndex = 0
cboStructures.Update()
FL_ADDED_NEW_STRUCTURE = False
End Sub
</pre>
The problem is that the new components that were added do not show up in the combo box, but they are written to the file. I have verified this by looking at the component file and because the next time the program loads the new components are present...the problem is that the whole program needs to be reloaded for some reason. Any help would be greatly appreciated as this has been driving me crazy for over a month! Thanks in advanced.
P.S. The <code>ReLoadCustoms</code> sub is on <code>frmMain</code> and the <code>SaveFile</code> sub is on <code>frmStructures</code> and this is running on a PPC.
UPDATE: I have come to realize that for some reason the cboStructures.Items.Clear in the ReLoadCustoms does not actually clear the combo box. Any suggestions?
modified on Friday, July 10, 2009 2:45 PM
|
|
|
|
|
Two things occur to me.
1) at the beginning of ReLoadCustoms() you go through the StructureFile file and add each item to an ArrayList. If you run your application with a dummy StructureFile containing say 2 to 3 items, then add 1 new item, it would be relatively painless to use the debugger to watch the items being added to the list. Once you are sure that they are there you can move on to dealing with the ComboBox . Before that though you should consider using a List (Of Component) instead of an ArrayList . Look it up in the MSDN Documentation under Generics.
Also where you create the FileStream and the StreamReader , consider using a Using block. This will ensure that they are both closed and disposed properly without you having to worry about it. Something like this:
Dim div() As String
Using fs As New FileStream(AppPath & "\" & StructureFile, FileMode.Open, FileAccess.Read, FileShare.None)
'Clear Component Array
ComponentArray.Clear()
'Check if the file is empty
If Not fs.Length = 0 Then
'Create a new stream reader
Using Reader As New StreamReader(fs)
'Read each line of the file until the end of the file
Do Until Reader.EndOfStream
'Split each line delimited with '='
'(Structure=Member1,Member2,...,MemberN)
div = Reader.ReadLine.Split("=")
CurrentComponent.ComponentStructure = div(0)
CurrentComponent.ComponentMember = div(1)
'Save the component in the 'ComponentArray' array list
ComponentArray.Add(CurrentComponent)
Loop
'Close the stream reader
End Using
End If
End Using
Again look up Using in MSDN. In the MSDN Index look-up Using Statement you will see two sub items, have a read of them. It is far safer.
2) Instead of going through your ArrayList (List (Of Component) ) adding items to the Combo.Items one at a time, why not use DataBinding to bind the list to the ComboBox.DataSource . It will save you having to do all that clearing and adding. Take a look at ComboBox DataBinding Sample[^]
Please come back if I have not been clear.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|