|
Vimal, You probably need to look at TAPI, the telephony API. In VB there are a few off the shelf components available. Lookup Exceletel on the web. They have a suite of tools for placing and handling calls. Be warned. This area is a minefield.
Nursey
|
|
|
|
|
I am in need of creating a help file (as in windows)for my vb application. Please give guide lines for that.
|
|
|
|
|
I Need your help!!!!
How can I open a form(form1) from another form (form2) but form1 need to set as MDIchild of form main!
To open form1 from form2 by click a button.
Thanks so much for your help
|
|
|
|
|
Write this code in form2
dim frm as new form1
frm.show
Hope this solves ur problem as far as i understood.
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
place a command button on form 2 and write the following code behind the command button.
form1.show
unload me
|
|
|
|
|
I have a treeview with 18 nodes - 17 of which, when selected, show the requested relevant form. The eighteenth node (Node 16)has 19 tvwChild sub nodes for printing different reports.
My problem is:
If Node 16, tvwChild sub node, is clicked without first clicking on any of the other 17 nodes, the treeview is closed and I am returned to the start (as requested at the end of the Sub) without a report being printed:
If I click on any other node first then on a tvwChild sub node the correct report is printed.
How can I change the code so that the selected tvwChild sub node prints without the need to click elsewhere first?
|
|
|
|
|
I want to identify my computer with a const number or every other things?
like hard drive serial number(not change in format)
or sapce of ram or ... for recognition my computer in several cpmputers.
please if you can to help me,please send for me:
BEST REGARD
MkhProgrammer
MkhProgrammer
|
|
|
|
|
MAC Address could works, but I don't know how to get this with VB, when the command ipconfig you can, if you can make a process of this and get the stream you can get the MAC Address. Maybe, it's just a crazy idea.
----
hxxbin
|
|
|
|
|
I am making a game with tiles and when i draw the map i draw the tiles one by one, after one is drawn, it makes the next, in the next location, so theres just one image changing locations and images(form a string). i need it to keep the other ones there and draw the next one.
i think i want to do this with an array but im not shure.
what should i do?
----------------------------------------------------------
dim tile as string
----------------------------------------------
in the map load sub:
do
if textbox=1 then
tile=(location of picture)
end if
if textbox=2 then
tile =(location of pic.)
end if
-------------------------------------------------------
in the form1 paint sub:
e.graphics.drawimage(new bitmap(tile)tilept.x, tilept.y)
----------------------------------------------------------
thanks for your time
|
|
|
|
|
I am no expext, but I do know that if you are going to do an array you have do dim your tile a little diffently and you problably will need a timmer. First off I am interested in knowing if you are a student. Because I don't want to ruin ones learning experiance by giveing away to much code and then it is just copied into a form to get the grade.
But I will try to get you going on it.
Dim tile() As string '''I probably would use pictureBox
Also you will either have to put the number of how many images in the (21)
Or you will have to figure out a way to count of them and Redim them later.
Here is an example of how an array works. But will not help you for images,unless you can figure out how to convert the code to suit your needs.
Dim student() As String 'student is the array
Dim intCount As Integer ''intCount is the counter
If IO.File.Exists("A:grades.txt") Then 'This is used to check to see if a file exist.Not sure how that would be done for images.
my = IO.File.OpenText("A:grades.txt")
Do While my.Peek <> -1 ''This reads it to the end..
student = my.ReadLine ''Stores the data from a line in student
intCount += 1 ''keeps count of how many times it is done.
Loop ''repeats the process untill the end of the file has been reached. Btw the end of the file is identified by -1
Now you have to redim the the student to so you know how big the array is.
ReDim student(intCount)
my.Close() ''Always close any file readers.
But in your case I think you are looking for something more like this.
#Region " Windows Form Designer generated code "
#End Region
Dim bulb(47) As PictureBox
Dim a As Integer
Private Sub btnLights_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLights.Click
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
bulb(1) = PictureBox1
Repeat this process for the amount of the images you use.
Also you must have a main pictureBox. Mine was a christmas tree.
The Bulbs are little bitmaps made in paint.
The next process makes them blink.
For a = 1 To 47
bulb(a).Visible = Not bulb(a).Visible
Next
These are just sniplets of code so they probably won't work without putting some thought into them. But doing this will make you learn it better than just given the code away. Also if I have explain something wrong some please clarify it. As I have just completed a begginers level class with a B. I am no expert and I have lots to learn for myself.
|
|
|
|
|
hey, thanks for your help but im not shure what your saying. I'm a student but In high school, so Im not trying to cheet lol. Im sorry for not saying this but I'm not using picture boxes but bitmaps.
I'll email you the code so you can see what I mean, If you dont want to download it then I will post the code later, my email is: p_dog_2007@hotmail.com
thank you, if you dont have the time i can wait
|
|
|
|
|
Does anybody know how to fill the fields of IE's web page
from within VB or C++ ? What if the page is secure? Of
course, there is no problem to fill all the fields by
hand. The question is how to do it automatically, by
running .exe or .dll.
|
|
|
|
|
I have a textbox control that gets incremented by one whenever I right click in it. This works fine, however I also get the standard 'edit' popup box as well that appears. Is there a way to cancel this popup box from appearing?
Thanks.
|
|
|
|
|
|
Yes, I'm using Net. I looked up WndProc in the MSDN library, but can't really figure out what to do here. I know that somehow I'm supposed to trap this popup menu so that when it appears, I just disreguard it. Thing is I'm not really sure how to accomplish that. I'll play with it a bit more and see what I can get to happen.
Thanks.
|
|
|
|
|
Hi,
I am using a treeview and I saw a neat way of adding your own type of nodes using a class derived from TreeNode. My class is the same as a tree node but it has a key property I can use to index into collections of other stuff
class TreeNodeCommand
Inherits TreeNode
Public Key as string
End Class
In order to make my code slick I then wrote two conversion functions, so that any nodes returned from treeview are converted to TreeNodeCommand...
Private Function CurrentNode() As TreeNodeCommand
Return ToTreeNodeCommand(tvwCommands.SelectedNode)
End Function
Private Function RootNode() As TreeNodeCommand
Return ToTreeNodeCommand(tvwCommands.Nodes.Item(0))
End Function
' Convert tree node item to tree node command item
Private Function ToTreeNodeCommand(ByRef prItem As TreeNode) As TreeNodeCommand
Return CType(prItem, TreeNodeCommand)
End Function
OK, thats the background. I have a treeview that refers to TreeNodeCommands rather than TreeNodes.
I have drag and drop support on this treeview, but I dont want the user to be able to drop a particular thing on the Root node. So in my dragover code I select the node in the treeview under the mouse and using my CurrentNode and RootNode properties I check to see if they are the same node....
If Not CurrentNode Is RootNode Then
e.Effect = DragDropEffects.Copy
End If
...but guess what. Every single time the IF statement executes, I get another node added to the tree, which is effectively a CLONE of the root node.
If I do this, which is perfectly acceptable, but not as slick to read then all is well...
If Not tvwCommands.SelectedNode Is tvwCommands.Nodes(0) Then
e.Effect = DragDropEffects.Copy
End If
You will have had to see this to believe it. No where does any single line of code get executed that does a ...Nodes.Add. Yet, new nodes do appear.
I can work around this, but I would be really interested to see if for some reason you think the Clone method of the root node is being invoked by the type conversion, or by some other means. I think that's what it is. The interesting thing is I override the Clone method in my derived class and it doesn't get called at any time.
So, I am lost in la la land with this one people. Any thoughts or similar experiences would be appreciated. Perhaps I am missing something due to my lack of .NET experience.
Apologies for the lengthy post.
Nursey
|
|
|
|
|
It does seem that the root node is being duplicated by the tree. Here is another case...
' This function reads nodes and adds things to another collection
NodesToCommands(DirectCast(tvwCommands.Nodes(0), TreeNode), _
CommandList.SingletonObject.RootCommandTree)
...
The first parameter tvwCommands.Nodes(0) normally returns TreeNode. Please remember, and forgive my repetition, but in my case it returns a TreeNodeCommand object.
If I had the DirectCast around this parameter all is well. If I do not then the tree from the root node down is duplicated and added back to the tree!
Each time I can find work arounds to this stuff, but why the hell is it happening?
Nursey
|
|
|
|
|
Try this.
To access the RootNode tvwCommands.TopNode
Free your mind...
|
|
|
|
|
Hi Guille,
Yeh but I would still cast TopNode to a TreeNodeCommand see? The problem seems to be casting the node causes the tree to duplicate itself, get me?
Nursey
|
|
|
|
|
can someone pls tell me how do i do this when using a rtf???
[code]
Dim strHeading as string
dim strLabel as string
strheading = "====================================="
strlabel = "S.No Name Contents DateCreated"
[/code]
how do i put the str heading in one line of the rtf?
how do i move to the newline?
how do i put the strLabel in the new line?
how do i bring the cursor to the next new line?
tks a lot....
really really appreciate your help...
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
When I need to do this, I open wordpad (not word) and i type in some text, do some formatting and examine the structure of the generated rtf file
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
I have a question that may or may not be difficult to answer... I've never done anything like this before.
Could anyone provide me with information about how I could use visual basic 6 (not .net) to convert a bitmap image to a 2D array of pixels? I've found a reference page on the format of a BMP file, but it's not as detailed as I would hope... and when I try to use file input from the BMP file, I just come up with mostly null strings instead of usable bytes.
|
|
|
|
|
Im new to vb.net and Im trying to move mi apliccations to the new language...and i have the following problem.
Im trying to intercept the ListView messages because i want a LV footer to autoresize when a column resize.
I create a Class inherit a LV and override the WndProc sub. But when i try to intercept the WM_NOTIFY message, the asociated code seems incorrect.
Here is my code (the class):
-----------------------------------------------------------------------------
Public Class MyListView
Inherits System.Windows.Forms.ListView
Structure NMHDR
Dim hwndFrom As Long ' Window handle of control sending message
Dim idFrom As Long ' Identifier of control sending message
Dim code As Long ' Specifies the notification code
End Structure
Structure NMHEADER
Dim hdr As NMHDR
Dim iItem As Long
Dim iButton As Long
Dim lPtrHDItem As Long ' HDITEM FAR* pItem
End Structure
Public Const WM_NOTIFY = &H4E
Public Const WM_PAINT = &HF
Public Const WM_USER = &H400
Public Const WM_REFLECT = WM_USER + &H1C00
Const HDN_FIRST As Long = -300&
Const HDN_LAST As Long = -399&
Const HDN_GETDISPINFO As Long = (HDN_FIRST - 9)
Const HDN_BEGINDRAG As Long = (HDN_FIRST - 10)
Const HDN_ENDDRAG As Long = (HDN_FIRST - 11)
Const HDN_ITEMCLICK As Long = (HDN_FIRST - 2)
Const HDN_ITEMDBLCLICK As Long = (HDN_FIRST - 3)
Const HDN_DIVIDERDBLCLICK As Long = (HDN_FIRST - 5)
Const HDN_ITEMCHANGING As Long = (HDN_FIRST - 0)
Const HDN_ITEMCHANGED As Long = (HDN_FIRST - 1)
Const HDN_BEGINTRACK As Long = (HDN_FIRST - 6)
Const HDN_ENDTRACK As Long = (HDN_FIRST - 7)
Const HDN_TRACK As Long = (HDN_FIRST - 8)
Const NM_FIRST As Long = -0& ' (0U- 0U)
Const NM_CUSTOMDRAW As Long = (NM_FIRST - 12)
Const NM_RCLICK As Long = (NM_FIRST - 5)
Const NM_RELEASEDCAPTURE As Long = (NM_FIRST - 16)
Const NM_CLICK As Long = NM_FIRST - 2
Const LVN_FIRST As Long = 100
Const LVN_COLUMNCLICK As Long = LVN_FIRST - 8
Protected Overrides Sub WndProc(ByRef m As Message)
Dim nmh As NMHDR
Select Case m.Msg
Case WM_NOTIFY
nmh = CType(m.GetLParam(nmh.GetType), NMHDR)
If nmh.code = HDN_BEGINTRACK Then
MsgBox("track")
End If
End Select
MyBase.WndProc(m)
End Sub
End Class
'-----------------------------------------------------------------------------
The WM_NOTIFY is detected OK. But I cant get the HDN_BEGINTRACK code. Instead, I get some stranges values
like 5334658619277312 or 5334486820585472
Please HELP!
Thanks in advance.
|
|
|
|
|
First of all, in VB.NET long becomes integer, integer becomes short, ...
This may not solve your problem, but will help you with this and future translations
I suggest you read the translation guidelines @ MSDN
greetz
*Niels Penneman*
Software/Dev Site Personal Site
|
|
|
|
|
Thanks a lot Niels!!
Your sugestion was good, it help me a bit...
Now the values looks more "real"....but aparently
appears increased in 20 (i.e.: -326 instead -306)
But now I'm closer to the solution!
Any idea why this happenns?
|
|
|
|