Hmmm....bitbit Seems Easier Than Trying To Do Maps With An Editor?
Hello again,
I got my map working with bitbit, but the things are super small. I can barely see em hehe, anyone got a site that will show the break down of bitbit that what represents what? I had to just play with some and just do a row of numbers and see what I came out with. The last question is, to increase the actual size my bits display at do I need to increase the pixel size?
Thx for any help.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Issues With My Map Editor And Scrolling/loading Maps
My Programming Teacher (Besides math, I > Him at VB) and I are stumped as to how to allow scrolling properly, and how to load saved maps. I have everything working except for the above two issues. Any assistance would be greatly appreciated. The offending code is in the V/HScroll_Change, and LoadMap function.
To lay tiles, first go to File:New and make it something like 30x30 (Use default graphics set) and select from the palette and click. If it is going too slow, turn the grid on.
And on a different subject: is there any way (using API or not) to get around the integer limit in VB? Sometimes Long just isn't enough for me.
Help With BitBit
Hello,
I am new to the gaming scene. I have picked up a little here and though however. I was wonder how to determine the size of the map window? Uhh...How to make it Show more of the map? The example I am looking at only has a small block, but I want to increase it to view more map at a time. Any suggestions on where to start?
Bitbit Help
hey i am making a character moving using bitblt to bit the character into a picture box
how to i make it so when i move the picture it will not leave the previous picture behind. so it will look like that character is moving.
thanks
BitBit Help
first off, what is Bit Bit, and how do you use it, can someone give me a good place to learn it from, tutorials or something, thanks in advance
Working With BitBit
Hi,
I've just began using BitBit now, so i'm not too good, i'm progressing slightly, but have a small problem...
Anyway, i've began making a square grid based maze game to get used to the functions of BitBit and cant seem to get something right, the game currently in no way resembles a maze, because I haven't started that bit yet...
To move the sprite properly, on a square-based grid i have set up an intXNow value to work with the intX, so that the character only moves so far at a time, by presetting intX to 10, then everytime you press to move, intXNow updates itself to equal intX, then runs the movement part on a timer...
Code:
Do Until intX >= intXNow + 50
-- movement code --
Loop
This works fine, but when you run it the first time he moves, he does four steps, the next time he does 5 steps, so he is no longer in the center of the x-axis grid...
I'm not sure what I have done wrong with this code.
Can somebody please look at my source code and tell me what i have done wrong to cause this uneven movement.
The source is in the zip below...
Your Help Is Greatly Appreciated.
Just Cant Understand BitBit!
Ok, ive tryed to understand this stuff for about 4 hours by now. And i just dont GET IT! I get NO ERRORS at all, but NOTHING HAPPENS either. So i wondered if anyone would post a newbie BitBit program for me.
thx
BitBit Error
When i try to initialize BitBit i get this error:
Help????
BitBit With MSChart
Can you use BitBit to make a realtime MSChart Graph not flicker? I've looked through some of the threads here and they seem to mainly use pictureboxes for gaming. Is the principle the same, if so how would i implemet it?
Thanks
Sean
DLLImport - GDI32.dll - BitBit -
hi,
the Issue is ,
I would like to crop part of image. (I know the rectangle to be cropped from the tiff image). I tried DrawImage. But some Pixel Information is lost.
So I am trying to use BitBit approach.
My Code is ::::::
---------------Declaration - ----------------------
<DllImport("gdi32.dll", EntryPoint:="BitBlt", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function BitBlt( _
ByVal hdcDest As IntPtr, _
ByVal nXDest As Integer, _
ByVal nYDest As Integer, _
ByVal nWidth As Integer, _
ByVal nHeight As Integer, _
ByVal hdcSrc As IntPtr, _
ByVal nXSrc As Integer, _
ByVal nYSrc As Integer, _
ByVal dwRop As Int32)
End Function
Private Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
-----------------------
My function for cropping is
----------------------------
Dim g1 As Graphics = PictureBox1.CreateGraphics()
Dim imgCrop As New Bitmap(200, 200)
Dim g2 As Graphics = Graphics.FromImage(imgCrop)
Dim dc1 As IntPtr = g1.GetHdc()
Dim dc2 As IntPtr = g2.GetHdc()
BitBlt(dc2, 0, 0, 200, 200, dc1, 100, 200, SRCCOPY)
g1.ReleaseHdc(dc1)
g2.ReleaseHdc(dc2)
imgCrop.Save("c:Captured.jpg", ImageFormat.Jpeg)
MsgBox("Finished Saving Image")
------------
Error Msg :::
Unhandled Exception
PInvoke restriction: cannot return variants.
Anyone has idea about where I am doing wrong. Or any better approach for this
Transparency, BitBit() And Number Sorting
1. Transparency
Will a gif with a transparent background still have a transparent background on a form? If not then how can i get transparent backgrounds?
2. BitBit()
Unless it is very complicated and hard to explain could you show how to use BitBit() for animation?
3. number sorting
i have this code:
VB Code:
Dim dblAns As String Dim intDig As IntegerDim dbl As StringdblAns = "2856457889" For intNum = 1 To Len(dblAns) intDig = Mid(dblAns, intNum, 1) If (intDig Mod 2) = 0 Then If Len(dbl) Then dbl = dbl & ", " & Format(intDig) Else dbl = Format(intDig) End If Else dbl = dbl & Format(intDig) End IfNext intNum MsgBox "The numbers are:" & dbl
it splits the number 2856457889 into 2, 85, 6, 457, 8, 89
even numbers start a new number
rather than putting the split numbers into a string and displaying it in a msgbox i want it to load a new txtbox eg. txtNum fo each number.
thnx 4 help and i hope this post is more successful than last time
Make Bitmap Transparent With BitBit
Hi all -
Lets say I have a bitmap with a region that has been marked with a certain color to detone a transparent area - how could I go about BitBit'ing on top of another picture in VB so that the solid color becomes transparent? THanks
-Chris
Questions: BitBit Moving, Walkmasks And Item Pickups.
Ok, so far have i quickly created a small program where a picture(the guy you control) moves instantly to the location of your click. Theres 3 things i must now:
1. How can i make my guy move slowly to the targeted location? not instantly.
2.How can i create walkmasks? Forexample if i create a tree, and i dont want my guy to walk right through the tree but around it.
3.How can i make my character pick up items? Forexample how can i make my guy get 10 score-points when he moves over an item, which in reality is a picture.
Edit*
I use BitBit.
This is not going to be a real game, iam just testing things out before i start creating a game.
Nothing is animated.
Hmmm.....?
Aight, im puzzled. I am away from home alot, and i want to design a program that allows me to communicate to my parents. I dont want to use MSN or AOL or email just cause its not original :P I want to make a program where i can be like... yeah, i made this! So, enough about that, I will be at various computers on my trips, and so, if i have a copy of this program, i want it to sent messages back and forth between the computer im on and my parents. I dont care about my parents IP getting out so security is no biggie right now, but how do i get messages to send between 2 computers.??
Hmmm
I've been developing a project on a floppy, but recently the disk top broke. I want to move the project onto another floppy... Although, the 'project' wont move. So i moved the 5 forms and the 2 modules... created a new project on a Floppy and saved the 5forms/2modules onto the disk with the new project, added them to the project, but yet i got an error on my form 3... i opened this in a notepad and
"Line 93: Property ItemData in CboCourt2 had an invalid file reference.
Line 95: Property List in CboCourt2 had an invalid file reference.
Line 305: Property ItemData in CboCourt had an invalid file reference.
Line 307: Property List in CboCourt had an invalid file reference."
I dont know if the above could help identify and solve the problem... if anyone could help with this, please.
Hmmm
Hi,
I have a sub in a mod that responds to events on a window created with createwindowex. I need that sub to call a sub in the particular instance of a class or to recieve a collection from the instance from which the event was caused.
for eg.
cwin and cwindow are instances of this class
cwin contains a collection with x dcs in it
cwindow contains a collection with y dcs in it
an event is triggered on one of the windows created by these classes
the event, hwnd etc is returned to a public sub
this sub needs to know whether event applies to cwin or cwindow
(this function does not know what the users have called the classes)
Its late and i dont know if ive explained this very well...
please tell me what u think
thanks.
Hmmm :-o
Hi!
You know PHP.net's PHP thing for IIS, right? The string in IIS goes something like: "c:phpphp.exe %s". This gives php.exe the php file's location. What i'd like to know is how to create my own (i.e. give the output headers required from my own VB app)
~John
Hmmm... Asc(27)??????????
Hi all... i have this code.. how do i see if my variable c is equal to the escape button..???
Code:
c = MSComm1.Input
If c = Asc(27) Then
MsgBox c
End If
Thanks for any help,
Someone
Hmmm
Hey.. Im making a progrma and my VB isnt giving me errors when im using variables that arent declared.. like if i made a typo
for example
dim blah as boolean
if bahl then
endif
no error there.. is that normal?! is there anyway to make it error?
thankyou
Hmmm???
I have two forms. One of them has a command button called t1. the other has an Exit button.
When I exit the 2nd form ( clicking the exit button) I would like to run "t1.enabled = false" which is on the first form.
this doesnt work....
form name = Table_select
Command button name = t1
Im in form exit. and have wrote this code in the exit button. ( before closeform.
Table_Selection.t1.Enabled = False
error keeps telling me "OBJECT REQUIRED
Hmmm Hex?
I am Planning to make a hex color changer for MSN messanger by changing this registry key:-
HKEY_CURRENT_USERSoftwareMicrosoftMessangerService
How would i do this? I want the program to display all possible colors and their Hex Decimal Codes e.g 66 cc 33
Hmmm ANYONE!!!!!!!!!!!!!
O.k i use a file sharing program called Direct Connect and i have noticed that it uses scripts for bots. I know that these can be altered. But what im wondering is..... IS there a way of making a visual basic bot e.g like and MSN MESSENGER bot. Anyone got any ideas ????
Hmmm .....
Hello
I neeeeeeeeeeed to display a customer's history of payments on a form.
I would like to use some type of data grid to do this if possible. Some of the grids I have tried cannot be updated by the user (which i need to be able to do).
Which type of data grid is best to use if I need to be able to update any data (add new records or delete old records). I want the data inside the grid to change whenever I change customers. I'm using the ADO data control by the way.
Any ideas or comments are appreciated.
Thanx,
Clint
PS. How do you attach code to your posts here so that they appear the same (colours and formatting) as they do in vb.
Hmmm?
Come one, come all...
...Here's a bit of a Hairy Question.
We've all at some stage of our VB.LIVES used the Mid Function and the Mid Statement.
eg. Mid() function:
Dim strTemp as String
strTemp = "Hello World!"
MsgBox Mid(strTemp, 7, 6)
'Will return the string: "World!"
Mid statement:
Dim strTemp as String
strTemp = "Hello World!"
Mid(strTemp, 7, 6) = "VB-ers"
'Will set strTemp to be: "Hello VB-ers"
Question is this: I want to be able to write a String Manipulation Function (& Statement) such as the Mid Statement (Above). How would I go about doing this?
ie. I know how to write Functions that can be used on the right-hand side of an "=" sign. Question is how can I get a Function to equal something already just by calling it? (ie. Because when I called it it was on the left-hand side of the "=" sign).
ie2. A standard Function can be used to assign a value to a Variable. What I want to do is use a Fariable to assign a value to a function, that has the same name as its counterpart.
Hmmm......
i have 3 combo boxes and a public variable for each of
them. I need to carry them over to another form to
use them as the captions of 3 labels. How do i call
them on the form that i have the labels on??
Don't Want To Use If...End If....hmmm
I've got 30+ Checkboxes and I need to query them all and if they are blank I need to append some text to a string.
I really don't want to use 400 lines with just If/End if
What's the most efficent way to handle this?
PowerBasic...? Hmmm...
I Was reading up on PowerBasic.. What do you think of PowerBasic??
Does it have the same syntax as VB?, functions Etc..?? Is it as easy to learn as VB 6 ? whats everyones opinion ?? Yay or Nay?
Hmmm Dir List Box...
I don't suppose any body could tellme if there is a way to start a dir list box at a certain level excluding the rest... ex... starts at C:documents and settingsadministratorapplication dataaim
now that it starsts there can I eliminate all the upper end stuff such as root admin appdata and just start at aim....
so the dir list box only shows the sub dir's of folder aim?????
if anybody knows I would appreciate it :-) thanks
DigsterX
BitBlt Hmmm
Hey ive been searching around looking for stuff on BitBlt but i just cant seem to grasp it.
Im trying to figure out how to BitBlt for Transperency i think it is or Masking to remove the Backround from the Image.
Like i have two picture box's and i wanted to do that thing where you BitBlt the Mask Picture and then BitBlt the actual picture overtop in a picturebox.
Can anyone explain this Method to me or give me anywhere that might be a bit more explanotory?.
Hmmm Is There An Answer To This?
i have searched for ages how to do this....
i have a datagrid with an ado connection to an access database with a load of data in it..... i want to print the contents of the datagrid out in the tabular form. i dont want to use printform as it will only print out what is visable...
i have searched for ages and cant find any help anywhere
any help here?
cheers
golyath.
Hmmm, Who Can Solve This?
I want to make a "clever" form, it's the form when you put mouse on it, it becomes long, when you don't put on it, it becomes short. Well, I write this code to do the thing.
Sometimes, it works correct,,, But, sometimes it won't work.
So, I go here to seek for some help:D
VB Code:
Private Declare Function ReleaseCapture Lib "user32" () As LongPrivate Declare Function SetCapture Lib "user32" (ByVal hwnd As Long) As Long Private Sub Form_Click() Me.Tag = ""End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If Me.Tag = "In" Then If X < 0 Or Y < 0 Or X > Me.Width Or Y > Me.Height Then Me.Tag = "" ReleaseCapture Me.Caption = "Leave" Me.Height = 795 End If Else Me.Tag = "In" SetCapture Me.hwnd Me.Caption = "ComeIn" Me.Height = 2795 End IfEnd Sub
For details, U can look the picture, : D
Hmmm, Wat Is Wrong?
ok, i've been workin on a lil browser... and i sent it after i finished to about 5 people!!
heres the strange part, me and 2 ppl could open it and use it just fine. But like 3 people , when they double clicked to open the file nothing comes up
i have no idea why it is not working for them
and i thought it mite be an o/s issue but one has win98 ( so do i ) and it worx for me...
anyone kno what could be wrong??
Hmmm...VB Being Funny?
VB Code:
For i = 0.2 To 0.3 Step 0.01 If i = 0.25 Then Form1.Print "0.25 - Yay! :)" Else Form1.Print i End If Next i
Does this work for you? I know it is probably just a problem with type comparison but it still seems a little stupid.
Hmmm!?!? Error!?!?!
Hi,
VB6 produces an error that I dont understand.
I have a Form inside a PictureBox...
It always happens when I close a Form that had a Picture Box with an embedded Form!!!
Do I have to "unset" any existing object or variable that might throw the error???
Here the Code:
- Set kanschrift = New Anschrift
- Dim oldhwnd As Long
- oldhwnd = SetParent(kanschrift.hwnd, Pic1.hwnd)
- kanschrift.Show
- MoveWindow kanschrift.hwnd, 0, 0, 400, 300, 1
- Me.SetFocus
Can you help me? Probably you need more information?
Thanx anyway!
crafics
Hmmm Timer ???
I'm working on an app that will rotate the windows desktop BMP under win2k. I was woundering if anyone had a idea on how i can tell the app when to run the event to change the image.
i was thinking about using a timer and changing the interval
with user input. but that kinda sux sence most users dont know 240 min. = 4 hours, and what do i do if someone wants the image to change once a day, once a week or once a month...?
please toss some ideas my way I'm kinda stuck here.
Thanks again for any help you all my be able to offer.
Hmmm Heres What I Have
I have a picture box that grabs random images from a specified folder I have a label that gets the filename of the image in the picture box I have a command button that I would like to move the file displayed in the picture box to a specific folder but everything I have tried doesnt work
Hmmm... Runtime????
I use VB5 to compile programs. I know I have to include MSVBVM50.DLL with my EXE files. I saw some programs like Setup programs without the RunTime file. so, they elimate about 1MB form the package size. Like InstallSheild, and some other softwares like it. How can I eliminate the run-Time file too???
Assembly??? - Hmmm..
Can anyone explain what assembly is(i heard it was a kind of low-level programing language),is it difficult,can it create standalone EXE files and in what application can i write asssembly.
Hmmm..where Do I Start?
I have an application that uses a TreeView for an interactive menu function
with its elements being populated from a database.
In the KEY component of the TreeView I put the acutal name of the program or
form to execute. Somthing like "frmOrder_status".
How can I execute that specific form with a Show operation?
Node.Key.Show don't seem to work.
Any suggestions?
--
Hal Davison
Davison Consulting
Hmmm Problem...
Hello , i have posted on here before im just having another problem sorry
in my quiz program im making a "credit" System where there is 5 goes and if the answer you choose is incorrect , you lose a credit and when credit = 0 i want everything to reset
The problem is the code i am trying to use atm for this system is not working and it just keeps freezing vb
This is typically how one of my quizzes look (no point posting them all since tehy look basically the same)
Code:
Dim sAnswer As String
Dim checker As Boolean
Dim QNUM As Integer
Private Sub LoadQuestion(ByVal qnumber As Integer)
Select Case qnumber
Case 0
txtDisplay.Text = "What is the Capital of Australia?"
sAnswer = "Canberra"
CmdOne.Caption = "Bosnia"
cmdtwo.Caption = "Sydney"
cmdthree.Caption = "Wagga"
cmdfour.Caption = "Canberra"
Case 1
txtDisplay.Text = "What country is New York in?"
sAnswer = "America"
CmdOne.Caption = "Coolangata"
cmdtwo.Caption = "Canada"
cmdthree.Caption = "Boston"
cmdfour.Caption = "America"
Case 2
txtDisplay.Text = "What is What's an abbreviation of?"
sAnswer = "What is"
CmdOne.Caption = "Whats up"
cmdtwo.Caption = "What is"
cmdthree.Caption = "What are"
cmdfour.Caption = "Whats"
Case 3
txtDisplay.Text = "What English team did Soccer Superstar David Beckham play for?"
sAnswer = "Manchester United"
CmdOne.Caption = "Arsenal"
cmdtwo.Caption = "Real Madrid"
cmdthree.Caption = "Manchester City"
cmdfour.Caption = "Manchester United"
Case 4
txtDisplay.Text = "What is the region called where Scotland , England and Wales is located?"
sAnswer = "Great Britian"
CmdOne.Caption = "United Kingdom"
cmdtwo.Caption = "Afghanistan"
cmdthree.Caption = "Ireland"
cmdfour.Caption = "Great Britian"
Case 5
txtDisplay.Text = "What company does Billionare Bill gates Own?"
sAnswer = "Microsoft"
CmdOne.Caption = "Athlon"
cmdtwo.Caption = "RedHat"
cmdthree.Caption = "Microsoft"
cmdfour.Caption = "Activision"
Case 6
txtDisplay.Text = "Which of the following creatures is not classified as a fish?"
sAnswer = "Whale"
CmdOne.Caption = "Whale"
cmdtwo.Caption = "Barramundi"
cmdthree.Caption = "Gourami"
cmdfour.Caption = "Shark"
Case 7
txtDisplay.Text = "Fill in the word for this famous song , ..What you want Baby, I got What you need Do you know I got it? All I 'm askin Is for a little ______ when you come home."
sAnswer = "Respect"
CmdOne.Caption = "Time"
cmdtwo.Caption = "Respect"
cmdthree.Caption = "love"
cmdfour.Caption = "money"
Case 8
txtDisplay.Text = "From what Race was Aragorn of the Lord Of The Rings?"
sAnswer = "Human"
CmdOne.Caption = "Elf"
cmdtwo.Caption = "dwarf"
cmdthree.Caption = "Knight"
cmdfour.Caption = "Human"
Case 9
txtDisplay.Text = "Which team won the Rugby World Cup in 2003?"
sAnswer = "England"
CmdOne.Caption = "Australia"
cmdtwo.Caption = "England"
cmdthree.Caption = "New Zealand"
cmdfour.Caption = "South Africa"
Case 10
txtDisplay.Text = "Which animal is also a name for one of the seven deadly sins?"
sAnswer = "Sloth"
CmdOne.Caption = "Tiger"
cmdtwo.Caption = "Snake"
cmdthree.Caption = "Sloth"
cmdfour.Caption = "Dingo"
Case Else
txtDisplay.Text = "You have Finished the Easy Quiz, this quiz is now reset if you wish to attempt again"
frmeasy.Hide
frmLevel.Show
frmLevel.cmdLevel2.Enabled = True
MsgBox "Congratulations You Completed The Easy Quiz , the Intermediate Quiz is now Enabled!"
CmdOne.Enabled = False
cmdtwo.Enabled = False
cmdthree.Enabled = False
cmdfour.Enabled = False
txtDisplay.Text = ""
txtAnswer.Text = ""
cmdStart.Visible = True
cmdStart.Caption = "Redo this Quiz"
cmdBack.Enabled = True
cmdBack.Caption = "Go Back to Level Select"
End Select
End Sub
Private Sub cmdBack_Click()
frmeasy.Hide
frmLevel.Show
End Sub
Private Sub cmdGo_Click()
End Sub
Sub CmdOne_Click()
If CmdOne.Caption = sAnswer Then
txtAnswer.Text = "Correct"
Else
txtAnswer.Text = "Incorrect"
End If
MoveToNextQuestion
End Sub
Private Sub cmdStart_Click()
LoadQuestion 0
CmdOne.Enabled = True
cmdtwo.Enabled = True
cmdthree.Enabled = True
cmdfour.Enabled = True
cmdStart.Visible = False
cmdBack.Enabled = False
cmdBack.Caption = "Stop the quiz to Enable"
cmdStop.Enabled = True
End Sub
Private Sub cmdStop_Click()
MsgBox "The Quiz has been Stopped and reset"
txtDisplay.Text = ""
txtAnswer.Text = ""
cmdStart.Visible = True
CmdOne.Enabled = False
cmdtwo.Enabled = False
cmdthree.Enabled = False
cmdfour.Enabled = False
cmdBack.Caption = "Back To Level Selection"
cmdBack.Enabled = True
cmdStop.Enabled = False
End Sub
Sub CmdTwo_Click()
If cmdtwo.Caption = sAnswer Then
txtAnswer.Text = "Correct"
Else
txtAnswer.Text = "Incorrect"
End If
MoveToNextQuestion
End Sub
Sub CmdThree_Click()
If cmdthree.Caption = sAnswer Then
txtAnswer.Text = "Correct"
Else
txtAnswer.Text = "Incorrect"
End If
MoveToNextQuestion
End Sub
Sub CmdFour_Click()
If cmdfour.Caption = sAnswer Then
txtAnswer.Text = "Correct"
Else
txtAnswer.Text = "Incorrect"
End If
MoveToNextQuestion
End Sub
Private Sub MoveToNextQuestion()
If txtAnswer.Text = "Correct" Then
MsgBox "Correct! Moving to next Question"
QNUM = QNUM + 1
txtAnswer.Text = ""
Else
MsgBox "Incorrect!! Resetting Quiz, Give it another go!"
QNUM = 0
txtAnswer.Text = ""
End If
LoadQuestion QNUM
End Sub
Private Sub Form_Load()
CmdOne.Enabled = False
cmdtwo.Enabled = False
cmdthree.Enabled = False
cmdfour.Enabled = False
Call Credit
End Sub
Noticed ive called my Public subprogram credit... still not working though
and this is the code that will not work with it
Code:Public Sub Credit()
Dim Credit As Integer
Credit = 5
Do
If frmeasy.txtAnswer.Text & frmMedium.txtAnswer.Text & frmHard.txtAnswer.Text & frmBuster.txtAnswer.Text = "Incorrect" Then
Credit = Credit - 1
End If
frmeasy.txtCredit = Credit
Loop Until Credit = 0
If Credit = 0 Then
MsgBox "Your credit is gone!!!"
frmLevel.cmdLevel2.Enabled = False
frmLevel.cmdLevel3.Enabled = False
frmLevel.cmdBuster.Enabled = False
End If
End Sub
what exactly am i doing wrong here???
Scrollbars And Userforms..hmmm....
Guys,
I have added the userform1.scrollbars = fmScrollBarsVertical. The scrollbars show up but they have no functionality. How would I give these scrollbars the ability to move the page up and down? Any help would be truly appriciated. Thanks in advance.....
Hmmm.....24 Hour Timers?
Hey guys, been playing with timers and they are exacly what my application needs, however, is there a "trick" to setting a timer to go off after a day (ie 86,400,000 ms). Or do I must a series of timers to do that?
Thanks guys,
Brock
Small Help Needed With A DLL [hmmm]
I am using this demo found here:
http://www.vbforums.com/showpost.php...0&postcount=24
to make a dll to create shell menu extensions for my application.
The problem is that it works only for single items. It does not work if multiple files are selected.
This is the code that aquires the selected file's/folders path and name, but I dont see how I can modify it to work for multiple selections:
VB Code:
SelectedFile = "" If DragQueryFile(pMedium.hGlobal, -1&, vbNullString, 0) = 1 Then szTemp = String(260, 0) ' Set the buffer size rc = DragQueryFile(pMedium.hGlobal, 0, szTemp, Len(szTemp)) ' Get the data If rc > 0 Then SelectedFile = Left$(szTemp, rc) End If
Hmmm, Printing Alignment Anyone?
Hi,
I need to print a PictureBox to the printer, with the result being centre aligned on the page, in the X and Y direction. Here is the code I am using:
VB Code:
Function PrintBarcodes()Dim picPrintX, picPrintY As Integer picPrint.Height = picLabel.Height * (Row + 1) picPrintX = (Printer.Width 2) - (picPrint.Width 2)picPrintY = (Printer.Height 2) - ((picLabel.Height * 10) 2) With Printer.PaperSize = vbPRPSA4.ColorMode = vbPRCMMonochrome.PaintPicture picPrint.Image, picPrintX, picPrintY.EndDocEnd WithEnd Function
This works great for the Y alignment, but the picture is printed slightly too much to the left when printed. Any ideas why this may be? Im sure the code works fine, and im sure the picture im printing has no white strip at the end of it. Maybe I havent set up the printer correctly or the paper isnt in the tray right...help please!
(VbAndersonic)
Hmmm, Not Exactly Giving The Right Result
I am trying to change the text of a text box by getting the handle to the window on which the cursor is.
VB Code:
Private Sub Timer1_Timer()If GetAsyncKeyState(VK_F2) <> 0 ThenGetCursorPos ptedhwnd = WindowFromPoint(pt.x, pt.y)SendMessage edhwnd, WM_SETTEXT, 0, "Hello"End IfEnd Sub
If I put the cursor over one of the text boxes on my form, it'll change to text to "ܪ" - not "Hello". But if I put the cursor over a text box, let's say a on a webpage in IE, it won't have any effect on it.
Anything going wrong with it?
Hmmm... Error Reporting... :(
What is the best way to send a file (errlog.txt) to me?
If my users have a problem I would like it to be mostly automated, so that they don't have to call me at 12Pm..
How do I send email using VB Script/Windows Script, or use the default email client, without the user actually seeing it is being sent?
I still want them to know it has been sent, like, leave it in their sent messages folder, but hopefully without them seeing it.
Thanks in advance,
|