I'm trying to create a multi-user interactive whiteboard
that has the ability to load a 'background' image to draw
ontop of.
The client/server needs to load a transparent layer for
each user that connects.
This is so the individual user layers can be cleared.
Each layer is painted on by the user it is assigned to,
so the layer must respond to mouse events.
(mousedown/mousemove)
I have tried creating my own control, and setting BackStyle
to transparent, which works all the way up until I use .PSet,
or .Line on the transparent control. The control's backcolor
instantly shows, and the map underneath is covered up.
debug.print shows that BackStyle is still transparent.
Ive also tried SetWindowLongA from user32:
SetWindowLong(ctlControl.hWnd, _
GWL_EXSTYLE, _
WS_EX_TRANSPARENT)
but this doesn't work either.
Does anyone have any idea how to get around this issue? 5 11453
On Fri, 26 Sep 2003 18:23:11 GMT, "C. Alexander"
<ca********@nospam.yahoo.com> wrote: I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of.
The client/server needs to load a transparent layer for each user that connects. This is so the individual user layers can be cleared.
Each layer is painted on by the user it is assigned to, so the layer must respond to mouse events. (mousedown/mousemove)
That sounds odd
Have you tried playing with the MaskColor and the MaskPicture ?
Could you strip down the problem and post a simple example ?
I've normally found UserControls fairly reliable, but have not tried
layering different instances of the same thing on top of each other
- look at the MaskPicture stuff ...
.... also make sure the ScaleMode is vbPixels
- Twips are a nightmare when setting Pixels
I didn't test any of the following.
Just some copy/past/modify concepts...
'-----------------------------------------------------
' In UserControl.ctl
'-----------------------------------------------------
' Properties:
AutoRedraw=True;BackStyle=Transparent;BorderStyle= None;WindowLess=True
'
Public Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y
As Single)
Public Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y
As Single)
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
RaiseEvent MouseMove(Button, Shift, X, Y)
End Sub
Public Sub SetPixColor(X As Single, Y As Single, Color As Long)
PSet (X, Y), Color
End Sub
'-----------------------------------------------------
'In Form1.frm
'-----------------------------------------------------
'
' Add a Image Control and set the Picture value to any image.
' Add the UserControl and place it over the Image Control
' Run the program, and click/drag on the area of the UserControl.
'
' The UserControl should turn from transparent, to the default background.
'
Private Sub UserControl1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If (Button = 1) Then
UserControl1.SetPixColor X, Y, 0
End If
End Sub
Private Sub UserControl1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If (Button = 1) Then
UserControl1.SetPixColor X, Y, 0
End If
End Sub
"J French" <er*****@nowhere.com> wrote in message
news:3f***************@news.btclick.com... On Fri, 26 Sep 2003 18:23:11 GMT, "C. Alexander" <ca********@nospam.yahoo.com> wrote:
I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of.
The client/server needs to load a transparent layer for each user that connects. This is so the individual user layers can be cleared.
Each layer is painted on by the user it is assigned to, so the layer must respond to mouse events. (mousedown/mousemove)
That sounds odd
Have you tried playing with the MaskColor and the MaskPicture ?
Could you strip down the problem and post a simple example ?
I've normally found UserControls fairly reliable, but have not tried layering different instances of the same thing on top of each other
- look at the MaskPicture stuff ...
... also make sure the ScaleMode is vbPixels - Twips are a nightmare when setting Pixels
Oh, also need HitTest to activate the mouse events.
Add:
' In UserControl.ctl
Private Sub UserControl_HitTest(X As Single, Y As Single, HitResult As
Integer)
If HitResult = vbHitResultOutside Then
HitResult = vbHitResultHit
End If
End Sub
Original:
'-----------------------------------------------------
' In UserControl.ctl
'-----------------------------------------------------
' Properties:
AutoRedraw=True;BackStyle=Transparent;BorderStyle= None;WindowLess=True
'
Public Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y
As Single)
Public Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y
As Single)
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
RaiseEvent MouseMove(Button, Shift, X, Y)
End Sub
Public Sub SetPixColor(X As Single, Y As Single, Color As Long)
PSet (X, Y), Color
End Sub
'-----------------------------------------------------
'In Form1.frm
'-----------------------------------------------------
'
' Add a Image Control and set the Picture value to any image.
' Add the UserControl and place it over the Image Control
' Run the program, and click/drag on the area of the UserControl.
'
' The UserControl should turn from transparent, to the default background.
'
Private Sub UserControl1_MouseDown(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If (Button = 1) Then
UserControl1.SetPixColor X, Y, 0
End If
End Sub
Private Sub UserControl1_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
If (Button = 1) Then
UserControl1.SetPixColor X, Y, 0
End If
End Sub
"J French" <er*****@nowhere.com> wrote in message
news:3f***************@news.btclick.com... On Fri, 26 Sep 2003 18:23:11 GMT, "C. Alexander" <ca********@nospam.yahoo.com> wrote:
I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of.
The client/server needs to load a transparent layer for each user that connects. This is so the individual user layers can be cleared.
Each layer is painted on by the user it is assigned to, so the layer must respond to mouse events. (mousedown/mousemove)
That sounds odd
Have you tried playing with the MaskColor and the MaskPicture ?
Could you strip down the problem and post a simple example ?
I've normally found UserControls fairly reliable, but have not tried layering different instances of the same thing on top of each other
- look at the MaskPicture stuff ...
... also make sure the ScaleMode is vbPixels - Twips are a nightmare when setting Pixels
Oh, also need HitTest to activate the mouse events.
Add:
' In UserControl.ctl
Private Sub UserControl_HitTest(X As Single, Y As Single, HitResult As
Integer)
If HitResult = vbHitResultOutside Then
HitResult = vbHitResultHit
End If
End Sub
"C. Alexander" <ca********@nospam.yahoo.com> wrote in message
news:%M******************@fe2.columbus.rr.com... I didn't test any of the following. Just some copy/past/modify concepts...
'----------------------------------------------------- ' In UserControl.ctl '----------------------------------------------------- ' Properties: AutoRedraw=True;BackStyle=Transparent;BorderStyle= None;WindowLess=True ' Public Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Public Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single) RaiseEvent MouseDown(Button, Shift, X, Y) End Sub
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X
As Single, Y As Single) RaiseEvent MouseMove(Button, Shift, X, Y) End Sub
Public Sub SetPixColor(X As Single, Y As Single, Color As Long) PSet (X, Y), Color End Sub
'----------------------------------------------------- 'In Form1.frm '-----------------------------------------------------
' ' Add a Image Control and set the Picture value to any image. ' Add the UserControl and place it over the Image Control ' Run the program, and click/drag on the area of the UserControl. ' ' The UserControl should turn from transparent, to the default background. '
Private Sub UserControl1_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single) If (Button = 1) Then UserControl1.SetPixColor X, Y, 0 End If End Sub
Private Sub UserControl1_MouseMove(Button As Integer, Shift As Integer, X
As Single, Y As Single) If (Button = 1) Then UserControl1.SetPixColor X, Y, 0 End If End Sub
"J French" <er*****@nowhere.com> wrote in message news:3f***************@news.btclick.com... On Fri, 26 Sep 2003 18:23:11 GMT, "C. Alexander" <ca********@nospam.yahoo.com> wrote:
I'm trying to create a multi-user interactive whiteboard that has the ability to load a 'background' image to draw ontop of.
The client/server needs to load a transparent layer for each user that connects. This is so the individual user layers can be cleared.
Each layer is painted on by the user it is assigned to, so the layer must respond to mouse events. (mousedown/mousemove)
That sounds odd
Have you tried playing with the MaskColor and the MaskPicture ?
Could you strip down the problem and post a simple example ?
I've normally found UserControls fairly reliable, but have not tried layering different instances of the same thing on top of each other
- look at the MaskPicture stuff ...
... also make sure the ScaleMode is vbPixels - Twips are a nightmare when setting Pixels
On Fri, 26 Sep 2003 19:51:23 GMT, "C. Alexander"
<ca********@nospam.yahoo.com> wrote: I didn't test any of the following.
Hmm - HitTest - VB6 only
- maybe someone else can see something
- I think I would stick with MaskColor and MaskImage This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: daimler |
last post by:
help!!!!!!!!
i did a
for i=1 to picture1.scaleheight/2
picture1.pset (i,i)
next i
and the pset is shown on the picture
|
by: Marcel |
last post by:
Hello, Iīm trying to create a custom user control, but I didnīt wanted
to put it inside a form, I wanted it to an object by itīs own..
I first created my class derived from Form, set the style to...
|
by: Noozer |
last post by:
Does anyone know if we will be able to put transparent backgrounds on
UserControls in VB 2004?
|
by: pcnerd |
last post by:
I've been playing with "classic" VB since version 3. I have VB6 Learning
Edition. Recently, I wanted to try VB.NET. I got a beginner's book with a CD
with the software & installed it. There are...
|
by: gerry |
last post by:
based on MSPress's ASP.NET 2.0 Applications Advaced Topics ( Table 12-3
p.472 ), and
most events should be automatically wired up when @Control
AutoEventWireup="true".
ie. Page_InitComplete() {}...
|
by: Blue |
last post by:
We have a custom word processing type editor built with C# and .NET 2.0 and
we need to support typing in languages other than English. I want to be
able to use the Windows IME to enter in text...
|
by: dragze |
last post by:
Hi,
On one of the pages of my site i use two javascripts, one makes transparency of png's work in IE, and the other embeds a flash player.
Now use one of the scripts it works fine, use both and...
|
by: Joe |
last post by:
Is it possible to inherit from a UserControl? If I try my user control
class is not recognized.
Thanks,
Joe
|
by: HaLo2FrEeEk |
last post by:
I'm working on an application that contains a UserControl that I made. I need this UserControl to have asemi-transparent background, but the controls need to stay 100% visible. Right now I'm using...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: erikbower65 |
last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps:
1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal.
2. Connect to...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |