|
He didn't say in his original post. I assumed Windows app.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
well, if it is Win app i used the code ..
Dim selected as DataGridCell
selected =DGlist.Currentcell
dim selectedItem as Object
selectedItem =DGlist.Item(selected.Rownumber,0)
Dim cellValue as integer
cellValue = CInt(selectedItem)
cheers....
|
|
|
|
|
hi
i want to know is it necessary to use printdialog,printpreview control for crystal report in vb.net2005? if yes then how it is use?
& one more question is that what is the difference between crystalpreview dialog control & printpreview ?
-- modified at 8:50 Sunday 30th September, 2007
Thanks
bye
|
|
|
|
|
I want to share some media files over LAN. I generated a list box which shows the list of files on my computer. I planned that when the user click on any filename mean when the listbox1 selectedindexchanged client computer automatically start VLC media player and start playing that file without asking any manual assistance from client.
I successfully generated file list on listbox1 which provide full path to the file when click on it mean ftp://server/media/filename.mp3
I use this code to activate the VLC media player
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
Dim furl As String = "ftp://speedexbb/media/" & ListBox1.SelectedItem.ToString
With Process1
.StartInfo.FileName = My.Computer.FileSystem.CombinePath(My.Computer.FileSystem.SpecialDirectories.ProgramFiles, "videolan\vlc\vlc.exe")
.StartInfo.Arguments = furl
.Start()
End With
End Sub
Please help that is there anything wrong. as the VLC made error that unable to open file. how can i get ride of this.
I will be gratefull for kind support
miss Juliana
|
|
|
|
|
Have you tried launching the file, from the FTP server in VLC??
I'm willing the bet that VLC player can't play a file from an FTP server. In that case, you'd have to download the file to the local hard drive, then play the file from that.
|
|
|
|
|
Hi friends,
i'm new in windows application. can u please give me an idea about the crystal report generation. i searched lot but in confusion..different articles in different ways.. help me please
cheers..
|
|
|
|
|
otta patti illeda onnun paranju tharan....
|
|
|
|
|
When button is clicked it adds an image to picture box.
I need the image to have a number next to it or a rollover hint with the image name and number.
The problem is, when you add more than one of the same image you don't know which one was added first.
All images on 'The Grid' also get listed in a list box where I also need a number next to the name so it can be selected.
Any help is appreciated.
Thanks
|
|
|
|
|
I'm not sure what your question is really. Do you have a problem keeping track of the images in the program, or just with the method of showing the information?
---
single minded; short sighted; long gone;
|
|
|
|
|
OK, here is the situation. In the program I have a number of buttons, when you click on one an image is placed in a picture box which then can be moved and positioned on the screen. The image name is then listed in a list box. If you click another button another image is placed on the screen. If you go back and click the same button again the same image is place on the screen and is listed in the list box with the same name. Is there a way to add a number to the listbox picture name and have it correspond to the same item on the screen.
Thanks
|
|
|
|
|
Your best bet is to dispose of the picture boxes, and render a number on top of the images when you render them. Or, just load the image, build a graphics object, draw a number on it, and then put it in your wretched picture box.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Do you have any sample code on how to render a number on top of an image.
Thanks
|
|
|
|
|
Hi,
if you are already rendering the image, you can add text to it like so:
Graphics g=myPaintEventArgs.Graphics;
g.DrawImage(...);
g.DrawString(myText, myFont, ...);
But if you want to modify an image to include some text, get its graphics:
using (Graphics g=Graphics.FromImage(myImage)) {
g.DrawString(myText, myFont, ...);
}
myImage.Save(...);
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
This is the code for one of my buttons which places an image. Does it get added to this section?
Thanks
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim p As PictureBox
p = New PictureBox
Current_item = Item_names.door
p.Image = System.Drawing.Image.FromFile(door_image)
PictureBox1.Left = 84
PictureBox1.Top = 78
PictureBox1.Height = p.Image.Height
PictureBox1.Width = p.Image.Width
PictureBox1.Visible = True
PictureBox1.BorderStyle = BorderStyle.FixedSingle
PictureBox1.Image = System.Drawing.Image.FromFile(door_image)
PictureBox1.Select()
If PictureBox1.Controls.Count > 0 Then
PictureBox1.Controls.RemoveAt(0)
End If
p.Dispose()
End Sub
|
|
|
|
|
Hi Tom,
1.
my example code was C# not VB, sorry. VB.NET can do the same with a slightly different
syntax (except for the using statement, which is a shorthand for automatically calling
Dispose when done with an object).
2.
alternative one was about rendering, hence it goes in the Paint handler.
alterbative two was about modifying an existing image, hence it goes anywhere you like
(but such that it gets called only once for any given image)
3.
your code is a mess:
what is p and what is PictureBox1?? p is never really used/shown!
why would you set Top and Left again and again?
are you adding (and removing) Controls to a PictureBox???
4.
I am not exactly sure what it is you want to achieve, but
I concur with Cristian's suggestion to throw out all pictureboxes.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have one data scraping project where my vb.net 2.0 application will browse pages and will extract information from there. The only problem is the IP address if the site comes to know that any IP is doing this job they block it. There are many softwares out there is in the market which hides the IP . Is there any way I can do this job in my application through code instead of buying any third party component ?
Any help would be precious
Best Regards
|
|
|
|
|
Do you understand what the purpose of an IP address is?
It allows servers to identify where the request for a page comes from and where to serve the results to.
This means that the server has to have an IP address supplied to it.
As far as I know all you can do is route yourself through a proxy server if you wish to hide your IP address.
You could write yourself a proxy server application - which is a task I am no expert in.
However that proxy server's IP address could get blocked.
You always pass failure on the way to success.
|
|
|
|
|
Written an app to play some sounds for me, in time with a text file I've got displayed.
Uses Microsoft.DirectX.AudioVideoPlayback (April 07 SDK I believe) and consists of an array of 7 Audio objects, where each is set to a particular file by the following:
Imports DXAV = Microsoft.DirectX.AudioVideoPlayback
Dim audioTracks(7) As DXAV.Audio
Private Sub SetSound(ByVal trackID As Byte, ByVal soundName As String)
Dim soundFullName As String = soundPath & soundName & soundExt ' Builds full filename
If IO.File.Exists(soundFullName) Then
audioTracks(trackID) = New DXAV.Audio(soundFullName)
Else
MsgBox("File not found: " & soundFullName & ".", MsgBoxStyle.Exclamation)
End If
End Sub
The actual play/stop actions are simply audioTracks(trackID).Play() and Stop() calls.
However, when I run this, the audioTracks(trackID) = New DXAV.Audio(soundFullName) fails because:
DLL 'C:\..dahdahdah..\Microsoft.DirectX.dll' is attempting managed execution inside OS Loader lock.
I've seen LoaderLocks when using multi-threaded apps with calls to Me.Controls but my app is single-threaded.
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
I am working on windows explorer style appliction.I have build the treeview and now what I want is that when user click on the treeview node it should get the information for that selected criteria and bound that data with the textboxes on right hand side?
How I can do this?Do I need to use class for this to select,update and insert data?
Thanks In advance.
Ejaz
|
|
|
|
|
Have you tried to solve the problem yourself?
I suggest that you go ahead and write some code. Google will throw up plenty of resources on treeview programming. If you have done that and are still experiencing difficulties, post again.
Paul
|
|
|
|
|
Thanks paul for ur reply.I tried to search on the net first and then I post my problem here.My treeview is working fine.Now I just want to know that how I can display the data on the base of treeview node selection.Either I need to run query every time to get the data from database on node selection or is this possible by storing the data in class and then just filter the data from class.
Any Idea how to store the data and then filter by providing criteria.
Thanks In advance
Ejaz
|
|
|
|
|
Handle the AfterSelect event to respond to node selection. The TreeViewEventArgs object supplied to the event handler has a Node property which will give you a reference to the selected node.
The TreeNode class exposes a Tag property which allows you to store any object data. You could consider creating your own data class to hold your associated and storing an object instance of it in this property for each node. It depends on how much data you need to associate with each node and how many items you are displaying in your TreeView. If the items/data are few, using the Tag property seems a good way to go. If the items/data are many, you may have to consider fetching the associated data from the database when a node is selected.
Regards
Paul
|
|
|
|
|
Hi,
Anyone know the code for a program to determine the screen size res etc so it can adjust the form size in runtime to fill the screen. Searching is not coming up with the goodies..
Thanks Heaps in advance.
|
|
|
|
|
The Screens class has all you need, but you can just maximise. Or are you worried about getting your form to lay itself out for the screen ? Then the anchor and dock properties of your controls are what you need.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Once again Christian your help has been most valuable
Many thanks
Frank
|
|
|
|